<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加</title>
<#assign base=request.contextPath  />
    <base id="base" href="${base}">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, adminUser-scalable=0">
    <link rel="stylesheet" href="${base}/static/win10/component/layui/css/layui.css" media="all">
    <script>
        var base =  "${base}";
    </script>
</head>
<body>
<br>
<form class="layui-form " action="">
         <input disabled type="hidden" id="companyId" name="companyId" value="${wechatCompany.companyId!}" >
          <div class="layui-form-item">
              <label class="layui-form-label">企业名字</label>
              <div class="layui-input-block">
                  <input disabled type="text" id="companyName" name="companyName" value="${wechatCompany.companyName!}"  autocomplete="off" placeholder="请输入企业名字"
                         class="layui-input">
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">企业资质验证</label>
              <div class="layui-input-block">
                  <input disabled type="text" id="companyQualification" name="companyQualification" value="${wechatCompany.companyQualification!}"
                         class="layui-input">
                  <button type="button" class="layui-btn" onclick="PreviewImg('${wechatCompany.companyQualification!}')">预览</button>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">营业执照图片</label>
              <div class="layui-input-block">
                  <input disabled type="text" id="companyLicenseImg" name="companyLicenseImg" value="${wechatCompany.companyLicenseImg!}"
                         class="layui-input">
                  <button type="button" class="layui-btn" onclick="PreviewImg('${wechatCompany.companyLicenseImg!}')">预览</button>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">关联用户的ID</label>
              <div class="layui-input-block">
                  <select name="userId" id="userId">
                      <option value="">请选择</option>
                      <#list userlist as item>
                          <#if "${item.trId}"=="${wechatCompany.userId!}">
                              <option value="${item.trId}" selected>${item.trId}</option>
                          <#else>
                              <option value="${item.trId}">${item.trId}</option>
                          </#if>
                      </#list>
                  </select>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">是否删除 0正常 / 1已删除</label>
              <div class="layui-input-block">
                  <@dict_tag type="yes-no">
                      <select name="companyIsDelete" lay-filter="companyIsDelete" id="companyIsDelete">
                          <option value="">请选择</option>
                          <#if dictList?? && dictList?size gt 0>
                              <#list dictList as dict>
                                  <#if "${dict.dictK}"=="${wechatCompany.companyIsDelete!}">
                                      <option value="${dict.dictK}" selected>${dict.dictVal}</option>
                                  <#else>
                                      <option value="${dict.dictK}">${dict.dictVal}</option>
                                  </#if>
                              </#list>
                          </#if>
                      </select>
                  </@dict_tag>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">企业备注</label>
              <div class="layui-input-block">
                  <input disabled type="text" id="companyRemarks" name="companyRemarks" value="${wechatCompany.companyRemarks!}"  autocomplete="off" placeholder="请输入企业备注"
                         class="layui-input">
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">企业区域ID </label>
              <div class="layui-input-block">
                  <input type="hidden" value="${wechatCompany.areaId!}" id="companyareaids">
                  <div class="layui-input-inline">
                      <select name="province" lay-filter="province" id="province">
                          <option value="">请选择省</option>
                      </select>
                  </div>
                  <div class="layui-input-inline" style="display: none;" id="city">
                      <select name="city" lay-filter="city">
                          <option value="">请选择市</option>
                      </select>
                  </div>
                  <div class="layui-input-inline" style="display: none;" id="area">
                      <select name="area" lay-filter="area">
                          <option value="">请选择县/区</option>
                      </select>
                  </div>
                  <div class="layui-input-inline" style="display: none;" id="street">
                      <select name="street" lay-filter="street">
                          <option value="">请选择街道</option>
                      </select>
                  </div>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">企业规模</label>
              <div class="layui-input-block">
                  <@dict_tag type="company_scale">
                      <select name="companyScale" lay-filter="companyScale" id="companyScale">
                          <option value="">请选择</option>
                          <#if dictList?? && dictList?size gt 0>
                              <#list dictList as dict>
                                  <#if "${dict.dictK}"=="${wechatCompany.companyScale!}">
                                      <option value="${dict.dictK}" selected>${dict.dictVal}</option>
                                  <#else >
                                      <option value="${dict.dictK}">${dict.dictVal}</option>
                                  </#if>
                              </#list>
                          </#if>
                      </select>
                  </@dict_tag>
              </div>
          </div>
          <div class="layui-form-item">
              <label class="layui-form-label">企业Logo</label>
              <div class="layui-input-block">
                  <input disabled type="text" id="companyLogo" name="companyLogo" value="${wechatCompany.companyLogo!}"  autocomplete="off" placeholder="请输入企业Logo"
                         class="layui-input">
                  <button type="button" class="layui-btn" onclick="PreviewImg('${wechatCompany.companyLogo!}')">预览</button>
              </div>
          </div>
</form>
<script src="${base}/static/win10/component/layui/layui.js?t=1"></script>
<script src="${base}/static/win10/js/jquery-1.8.3.min.js?t=1"></script>
<script src="${base}/static/win10/js/areaCallBack.js"></script>
<script>
    layui.use('form',function () {
        var form = layui.form;
        form.render();
    })
    function PreviewImg(value) {
        layui.use('layer', function () {
            var layer = layui.layer;
            var height = $(document).height()*0.8; //获取图片高度
            var width = $(document).width()*0.9; //获取图片宽度
            var imgHtml = "<img src='" + value + "' />";
            layer.open({
                type: 1,
                shade: 0.8,
                offset: 'auto',
                area: [width + 'px',height+'px'],
                shadeClose:true,//点击外围关闭弹窗
                scrollbar: false,//不现实滚动条
                title: false, //不显示标题
                content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
                cancel: function () {
                    //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 });
                }
            });
        });

    }
</script>
</body>
</html>